/*
 * Copyright (C), 2002-2017, 上海亦寻信息技术有限公司
 * FileName: PmoConfig.java
 * Author:   linyao
 * Date:     2017-3-9 下午4:28:38
 * Description: //模块目的、功能描述      
 * History: //修改记录
 * <author>      <time>      <version>    <desc>
 * 修改人姓名             修改时间            版本号                  描述
 */
package com.emm.yixun.website.constant;

import java.util.Date;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.emm.yixun.common.utils.DateUtils;
import com.emm.yixun.website.common.utils.MathUtil;

/**
 * PMO配置文件信息 〈功能详细描述〉
 * 
 * @author linyao
 * @see [相关类/方法]（可选）
 * @since [产品/模块版本] （可选）
 */
@Component
public class PmoConfig {
	private static String PATTERN = "yyyyMMddHHmmss";

	// 接口地址
	@Value("${pmo.request_url}")
	private String request_url;

	// 同步销售软件销售主数据接口
	@Value("${pmo.static_sale_request}")
	private String static_sale_request;

	// pmo提供的key
	@Value("${pmo.clientKey}")
	private String clientKey;

	// pmo提供的密码
	@Value("${pmo.clientPwd}")
	private String clientPwd;
	
	//车位业态(sys_tm_base_code_value)ID
	@Value("pmo.indust.parkIds")
	private String parkIds;
	
	
	//oa异构流程地址
	@Value("${oa.activity.url}")
	private String activityUrl;
	
	//oa待办流程跳回销售系统地址
	@Value("${oa.activity.pc}")
	private String activityPc;
	
	@Value("${oa.sysCode}")
	private String oaSysCode;
	
	//获取当前用户接口
	@Value("${oa.bridge.url}")
	private String oaBridgeUrl;
	
	//流程任务推送至OA地址
	@Value("${oa.act.task.url}")
	private String actTaskOaUrl;

	//是否推送OA提醒
	@Value("${oa.act.isSendOaMsg}")
	private boolean isSendOaMsg;
	
	/**
	 * oaBridgeUrl.
	 *
	 * @return  the oaBridgeUrl
	 * @since   JDK 1.6
	 */
	public String getOaBridgeUrl() {
	    return oaBridgeUrl;
	}

	/**
	 * oaBridgeUrl.
	 *
	 * @param   oaBridgeUrl    the oaBridgeUrl to set
	 * @since   JDK 1.6
	 */
	public void setOaBridgeUrl(String oaBridgeUrl) {
	    this.oaBridgeUrl = oaBridgeUrl;
	}

	public String getOaSysCode() {
	    return oaSysCode;
	}

	public void setOaSysCode(String oaSysCode) {
	    this.oaSysCode = oaSysCode;
	}

	public String getActivityPc() {
	    return activityPc;
	}

	public void setActivityPc(String activityPc) {
	    this.activityPc = activityPc;
	}

	public String getActivityUrl() {
	    return activityUrl;
	}

	public void setActivityUrl(String activityUrl) {
	    this.activityUrl = activityUrl;
	}

	public String getSeq() {
		String year = DateUtils.DateToString(new Date(), PATTERN);
		int six = MathUtil.buildRandom(6);
		return year + six;
	}

	public String getRequest_url() {
		return request_url;
	}

	public void setRequest_url(String request_url) {
		this.request_url = request_url;
	}

	public String getClientKey() {
		return clientKey;
	}

	public void setClientKey(String clientKey) {
		this.clientKey = clientKey;
	}

	public String getClientPwd() {
		return clientPwd;
	}

	public void setClientPwd(String clientPwd) {
		this.clientPwd = clientPwd;
	}

	public String getStatic_sale_request() {
		return static_sale_request;
	}

	public void setStatic_sale_request(String static_sale_request) {
		this.static_sale_request = static_sale_request;
	}

	public String getParkIds() {
		return parkIds;
	}

	public void setParkIds(String parkIds) {
		this.parkIds = parkIds;
	}

	public String getActTaskOaUrl() {
		return actTaskOaUrl;
	}

	public void setActTaskOaUrl(String actTaskOaUrl) {
		this.actTaskOaUrl = actTaskOaUrl;
	}

	public boolean isSendOaMsg() {
		return isSendOaMsg;
	}

	public void setSendOaMsg(boolean sendOaMsg) {
		isSendOaMsg = sendOaMsg;
	}
}
